package com.yjdb.sanyuantang.modules.App.controller;

import cn.dev33.satoken.stp.SaTokenInfo;
import cn.dev33.satoken.stp.StpUtil;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@Tag(name = "测试02")
@RequestMapping("/app")
@RestController
public class Test01Controller {


    @RequestMapping(path = "/test1", method = RequestMethod.GET)
    @ResponseBody
    public String test() {
        StpUtil.login(10001);
        SaTokenInfo tokenInfo = StpUtil.getTokenInfo();
        return tokenInfo.toString();
    }

}